Staging
v0.5.1
https://github.com/python/cpython
Revision 9aa4299882500ca3206514bced135c0a1083355d authored by Benjamin Peterson on 10 September 2008, 21:57:34 UTC, committed by Benjamin Peterson on 10 September 2008, 21:57:34 UTC
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r66337 | vinay.sajip | 2008-09-09 08:42:08 -0500 (Tue, 09 Sep 2008) | 1 line

  Issue #3809: Fixed spurious 'test.blah' file left behind by test_logging.
........
  r66347 | georg.brandl | 2008-09-09 14:26:00 -0500 (Tue, 09 Sep 2008) | 2 lines

  Fix varname in docstring. #3822.
........
  r66350 | georg.brandl | 2008-09-09 15:28:31 -0500 (Tue, 09 Sep 2008) | 2 lines

  #3472: update Mac-bundled Python version info.
........
  r66352 | benjamin.peterson | 2008-09-09 15:55:01 -0500 (Tue, 09 Sep 2008) | 4 lines

  Fix #3634 invalid return value from _weakref.ref(Exception).__init__

  Reviewers: Amaury, Antoine, Benjamin
........
  r66358 | benjamin.peterson | 2008-09-09 18:16:48 -0500 (Tue, 09 Sep 2008) | 1 line

  use the latest pygments version
........
1 parent 5e19e44
Raw File
Tip revision: 9aa4299882500ca3206514bced135c0a1083355d authored by Benjamin Peterson on 10 September 2008, 21:57:34 UTC
Merged revisions 66337,66347,66350,66352,66358 via svnmerge from
Tip revision: 9aa4299
dynload_atheos.c

/* Support for dynamic loading of extension modules */

#include <atheos/image.h>
#include <errno.h>

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


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

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

	if (Py_VerboseFlag)
		printf("load_library %s\n", pathname);

	lib = load_library(pathname, 0);
	if (lib < 0) {
		char buf[512];
		if (Py_VerboseFlag)
			perror(pathname);
		PyOS_snprintf(buf, sizeof(buf), "Failed to load %.200s: %.200s",
			      pathname, strerror(errno));
		PyErr_SetString(PyExc_ImportError, buf);
		return NULL;
	}
	PyOS_snprintf(funcname, sizeof(funcname), "PyInit_%.200s", shortname);
	if (Py_VerboseFlag)
		printf("get_symbol_address %s\n", funcname);
	if (get_symbol_address(lib, funcname, -1, &p) < 0) {
		p = NULL;
		if (Py_VerboseFlag)
			perror(funcname);
	}

	return (dl_funcptr) p;
}
back to top