Staging
v0.5.1
https://github.com/python/cpython
Revision e5caf1034b9f67a6e6005de1a6dbd8a8ef2193fe authored by Benjamin Peterson on 21 July 2009, 14:16:13 UTC, committed by Benjamin Peterson on 21 July 2009, 14:16:13 UTC
svn+ssh://pythondev@svn.python.org/python/branches/py3k

................
  r74140 | benjamin.peterson | 2009-07-21 09:11:27 -0500 (Tue, 21 Jul 2009) | 9 lines

  Merged revisions 74139 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/trunk

  ........
    r74139 | benjamin.peterson | 2009-07-21 09:08:40 -0500 (Tue, 21 Jul 2009) | 1 line

    must use _PyThreadState_Current so it isn't checked for NULL #6530
  ........
................
1 parent d98ef1a
Raw File
Tip revision: e5caf1034b9f67a6e6005de1a6dbd8a8ef2193fe authored by Benjamin Peterson on 21 July 2009, 14:16:13 UTC
Merged revisions 74140 via svnmerge from
Tip revision: e5caf10
dynload_dl.c

/* Support for dynamic loading of extension modules */

#include "dl.h"

#include "Python.h"
#include "importdl.h"


extern char *Py_GetProgramName(void);

const struct filedescr _PyImport_DynLoadFiletab[] = {
	{".o", "rb", C_EXTENSION},
	{"module.o", "rb", C_EXTENSION},
	{0, 0}
};


dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
				    const char *pathname, FILE *fp)
{
	char funcname[258];

	PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
	return dl_loadmod(Py_GetProgramName(), pathname, funcname);
}
back to top