Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: ports/python-static/dynload_ppapi.c

Issue 138913004: Build system for statically-linked Python. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Final update with merge against current naclports.py Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ports/python-static/config.site ('k') | ports/python-static/nacl.patch » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/python-static/dynload_ppapi.c
===================================================================
new file mode 100644
--- /dev/null
+++ b/ports/python-static/dynload_ppapi.c
@@ -0,0 +1,21 @@
+
+/* This module provides the simulation of dynamic loading */
+
+#include "Python.h"
+#include "importdl.h"
+
+const struct filedescr _PyImport_DynLoadFiletab[] = {
+ {".a", "rb", C_EXTENSION},
+ {0, 0}
+};
+
+extern struct _inittab _PyImport_Inittab[];
+
+dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
+ const char *pathname, FILE *fp)
+{
+ struct _inittab *tab = _PyImport_Inittab;
+ while (tab->name && strcmp(shortname, tab->name)) tab++;
+
+ return tab->initfunc;
+}
« no previous file with comments | « ports/python-static/config.site ('k') | ports/python-static/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698