]> gitweb.factorcode.org Git - factor.git/commitdiff
python.syntax: fix func_code => __code__
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Jan 2022 20:44:30 +0000 (12:44 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Jan 2022 20:44:30 +0000 (12:44 -0800)
extra/python/ffi/ffi.factor
extra/python/syntax/syntax-tests.factor

index d63a99ab885c5ac2b9e191dc69e24575428a5711..a6a118d4e69e2d422f1a19786747bedcd4ae3d02 100644 (file)
@@ -15,14 +15,17 @@ LIBRARY: python
 C-TYPE: PyObject
 
 ! Methods
-CONSTANT: METH_OLDARGS  0x0000
-CONSTANT: METH_VARARGS  0x0001
-CONSTANT: METH_KEYWORDS 0x0002
-CONSTANT: METH_NOARGS   0x0004
-CONSTANT: METH_O        0x0008
-CONSTANT: METH_CLASS    0x0010
-CONSTANT: METH_STATIC   0x0020
-CONSTANT: METH_COEXIST  0x0040
+CONSTANT: METH_OLDARGS   0x0000
+CONSTANT: METH_VARARGS   0x0001
+CONSTANT: METH_KEYWORDS  0x0002
+CONSTANT: METH_NOARGS    0x0004
+CONSTANT: METH_O         0x0008
+CONSTANT: METH_CLASS     0x0010
+CONSTANT: METH_STATIC    0x0020
+CONSTANT: METH_COEXIST   0x0040
+CONSTANT: METH_FASTCALL  0x0080
+CONSTANT: METH_STACKLESS 0x0100
+CONSTANT: METH_METHOD    0x0200
 
 C-TYPE: PyCFunction
 
index 927087e95cb1ee5c4b7a57ba32752030533f428d..2ef300c610439f4365996a26f3c61fa2450f1ba4 100644 (file)
@@ -83,12 +83,12 @@ IN: python.syntax.tests
 
 ! Introspection
 PY-METHODS: func =>
-    func_code ( func -- code ) ;
+    __code__ ( func -- code ) ;
 
 PY-METHODS: code =>
     co_argcount ( code -- n ) ;
 
-{ 1 } [ $splitext $func_code $co_argcount py> ] py-test
+{ 1 } [ $splitext $__code__ $co_argcount py> ] py-test
 
 ! Change sys.path
 { t } [