[pypy-commit] cffi default: Rewords

arigo noreply at buildbot.pypy.org
Wed Jun 3 08:43:22 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2161:21154b1d1666
Date: 2015-06-03 08:44 +0200
http://bitbucket.org/cffi/cffi/changeset/21154b1d1666/

Log:	Rewords

diff --git a/doc/source/overview.rst b/doc/source/overview.rst
--- a/doc/source/overview.rst
+++ b/doc/source/overview.rst
@@ -82,7 +82,10 @@
 
     from _simple_example import ffi
 
-    lib = ffi.dlopen(None)        # or path to a library (see below for Windows)
+    lib = ffi.dlopen(None)      # Unix: open the standard C library
+    #import ctypes.util         # or, try this on Windows:
+    #lib = ffi.dlopen(ctypes.util.find_library("c"))
+
     lib.printf(b"hi there, number %d\n", ffi.cast("int", 2))
 
 Note that this ``ffi.dlopen()``, unlike the one from in-line mode,
@@ -91,9 +94,8 @@
 ``dlopen()`` or ``LoadLibrary()`` functions.  This means that
 ``ffi.dlopen("libfoo.so")`` is ok, but ``ffi.dlopen("foo")`` is not.
 In the latter case, you could replace it with
-``ffi.dlopen(ctypes.util.find_library("foo"))``.  Also, on
-Windows, passing None to open the standard C library does not work;
-try instead ``ffi.dlopen(ctypes.util.find_library("c"))``.
+``ffi.dlopen(ctypes.util.find_library("foo"))``.  Also, None is only
+recognized on Unix to open the standard C library.
 
 For distribution purposes, remember that there is a new
 ``_simple_example.py`` file generated.  You can either include it


More information about the pypy-commit mailing list