[pypy-svn] r33964 - pypy/dist/pypy/translator/c/src

arigo at codespeak.net arigo at codespeak.net
Tue Oct 31 16:30:12 CET 2006


Author: arigo
Date: Tue Oct 31 16:30:08 2006
New Revision: 33964

Modified:
   pypy/dist/pypy/translator/c/src/ll_os.h
   pypy/dist/pypy/translator/c/src/support.h
Log:
Obscure quick hack to fix the genc tests: RPyListOfString is not always
declared.



Modified: pypy/dist/pypy/translator/c/src/ll_os.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/ll_os.h	(original)
+++ pypy/dist/pypy/translator/c/src/ll_os.h	Tue Oct 31 16:30:08 2006
@@ -77,7 +77,9 @@
 void LL_os_symlink(RPyString * path1, RPyString * path2);
 long LL_readlink_into(RPyString *path, RPyString *buffer);
 long LL_os_fork(void);
+#ifdef HAVE_RPY_LIST_OF_STRING     /* argh */
 long LL_os_spawnv(int mode, RPyString *path, RPyListOfString *args);
+#endif
 RPyWAITPID_RESULT* LL_os_waitpid(long pid, long options);
 void LL_os__exit(long status);
 void LL_os_putenv(RPyString * name_eq_value);
@@ -376,7 +378,7 @@
 }
 #endif
 
-#ifdef HAVE_SPAWNV
+#if defined(HAVE_SPAWNV) && defined(HAVE_RPY_LIST_OF_STRING)
 long LL_os_spawnv(int mode, RPyString *path, RPyListOfString *args) {
 	int pid, i, nargs = args->l_length;
 	char **slist = malloc((nargs+1) * sizeof(char*));

Modified: pypy/dist/pypy/translator/c/src/support.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/support.h	(original)
+++ pypy/dist/pypy/translator/c/src/support.h	Tue Oct 31 16:30:08 2006
@@ -25,6 +25,10 @@
 		memcpy(itemsarray->items, PyString_AS_STRING(s),        \
                        itemsarray->length)
 
+#ifdef __RPyListOfString_New     /*  :-(  */
+#  define HAVE_RPY_LIST_OF_STRING
+#endif
+
 #ifndef PYPY_STANDALONE
 
 /* prototypes */



More information about the Pypy-commit mailing list