]> gitweb.factorcode.org Git - factor.git/commitdiff
python: don't PySys_SetArgvEx in startup hook
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Jan 2022 19:29:44 +0000 (11:29 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 18 Jan 2022 19:29:44 +0000 (11:29 -0800)
extra/python/python.factor

index 611a8283ac29b4977b897d942e69a93932173652..2c49863e575f8bc6a393d2689d2abf17c7468c0a 100644 (file)
@@ -10,18 +10,9 @@ ERROR: python-error type message traceback ;
 
 SPECIALIZED-ARRAY: void*
 
-! Borrowed from unix.utilities
-: strings>alien ( strings encoding -- array )
-    '[ _ malloc-string ] void*-array{ } map-as f suffix ;
-
 ! Initialization and finalization
 : py-initialize ( -- )
-    Py_IsInitialized [
-        Py_Initialize
-        ! Encoding must be 8bit on Windows I think, so
-        ! native-string-encoding (utf16n) doesn't work.
-        (command-line) [ length ] [ utf8 strings>alien ] bi 0 PySys_SetArgvEx
-    ] unless ;
+    Py_IsInitialized [ Py_Initialize ] unless ;
 
 : py-finalize ( -- )
     Py_IsInitialized [ Py_Finalize ] when ;