Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r378:710595b1db2a Date: 2012-06-15 23:04 +0200 http://bitbucket.org/cffi/cffi/changeset/710595b1db2a/
Log: Remove the "static globvar" here, as they are confusing: it's usually not about global vars. diff --git a/doc/source/index.rst b/doc/source/index.rst --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -396,11 +396,11 @@ typedef struct { int x, y; } foo_t; - static foo_t globvar = { 1, 2 }; // C syntax - globvar = ffi.new("foo_t", [1, 2]) # CFFI equivalent + foo_t v = { 1, 2 }; // C syntax + v = ffi.new("foo_t", [1, 2]) # CFFI equivalent - static foo_t globvar = { .y=1, .x=2 }; // C syntax - globvar = ffi.new("foo_t", {'y': 1, 'x': 2}) # CFFI equivalent + foo_t v = { .y=1, .x=2 }; // C syntax + v = ffi.new("foo_t", {'y': 1, 'x': 2}) # CFFI equivalent Like C, arrays of chars can also be initialized from a string, in which case a terminating null character is appended implicitly:: _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit