[pypy-svn] r16232 - in pypy/dist/pypy/translator/c: . src

tismer at codespeak.net tismer at codespeak.net
Mon Aug 22 20:36:50 CEST 2005


Author: tismer
Date: Mon Aug 22 20:36:48 2005
New Revision: 16232

Modified:
   pypy/dist/pypy/translator/c/extfunc.py
   pypy/dist/pypy/translator/c/src/ll_os.h
Log:
implemented os.system

Modified: pypy/dist/pypy/translator/c/extfunc.py
==============================================================================
--- pypy/dist/pypy/translator/c/extfunc.py	(original)
+++ pypy/dist/pypy/translator/c/extfunc.py	Mon Aug 22 20:36:48 2005
@@ -22,6 +22,7 @@
     ll_os  .ll_os_isatty:  'LL_os_isatty',
     ll_os  .ll_os_ftruncate:'LL_os_ftruncate',
     ll_os  .ll_os_strerror: 'LL_os_strerror',
+    ll_os  .ll_os_system:  'LL_os_system',
     ll_time.ll_time_clock: 'LL_time_clock',
     ll_time.ll_time_sleep: 'LL_time_sleep',
     ll_time.ll_time_time:  'LL_time_time',

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	Mon Aug 22 20:36:48 2005
@@ -174,9 +174,12 @@
 }
 #endif
 
-RPyString *LL_os_strerror(int errnum)
-{
+RPyString *LL_os_strerror(int errnum) {
 	char *res;
 	res = strerror(errnum);
 	return RPyString_FromString(res);
 }
+
+long LL_os_system(RPyString * fname) {
+  return system(RPyString_AsString(fname));
+}



More information about the Pypy-commit mailing list