Staging
v0.8.1
Revision 935f09aea1ab7eb60e881b88d3f82e2ac92bcf98 authored by Florent Xicluna on 09 August 2010, 22:15:51 UTC, committed by Florent Xicluna on 09 August 2010, 22:15:51 UTC
................
  r83902 | florent.xicluna | 2010-08-09 22:02:00 +0200 (lun., 09 août 2010) | 25 lines

  Merged revisions 83833,83838-83839,83859,83878 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r83833 | florent.xicluna | 2010-08-08 18:25:27 +0200 (dim., 08 août 2010) | 2 lines

    Add test case for the HTTPResponse being an iterable.  Follow-up of issue #4608.
  ........
    r83838 | florent.xicluna | 2010-08-08 20:03:44 +0200 (dim., 08 août 2010) | 2 lines

    Typo.
  ........
    r83839 | florent.xicluna | 2010-08-08 20:06:13 +0200 (dim., 08 août 2010) | 2 lines

    Issue #7564: Skip test_ioctl if another process is attached to /dev/tty.
  ........
    r83859 | florent.xicluna | 2010-08-09 00:07:16 +0200 (lun., 09 août 2010) | 2 lines

    Fix #8530: Prevent stringlib fastsearch from reading beyond the front of an array.
  ........
    r83878 | florent.xicluna | 2010-08-09 10:29:08 +0200 (lun., 09 août 2010) | 1 line

    Merge the 2to3 script from /sandbox/trunk/2to3/2to3, revision 72867 (latest).
  ........
................
  r83907 | florent.xicluna | 2010-08-09 22:29:44 +0200 (lun., 09 août 2010) | 27 lines

  Missed the svnmerge property on r83902.

  Recorded merge of revisions 83833,83838-83839,83859,83878 via svnmerge from
  svn+ssh://pythondev@svn.python.org/python/branches/py3k

  ........
    r83833 | florent.xicluna | 2010-08-08 18:25:27 +0200 (dim., 08 août 2010) | 2 lines

    Add test case for the HTTPResponse being an iterable.  Follow-up of issue #4608.
  ........
    r83838 | florent.xicluna | 2010-08-08 20:03:44 +0200 (dim., 08 août 2010) | 2 lines

    Typo.
  ........
    r83839 | florent.xicluna | 2010-08-08 20:06:13 +0200 (dim., 08 août 2010) | 2 lines

    Issue #7564: Skip test_ioctl if another process is attached to /dev/tty.
  ........
    r83859 | florent.xicluna | 2010-08-09 00:07:16 +0200 (lun., 09 août 2010) | 2 lines

    Fix #8530: Prevent stringlib fastsearch from reading beyond the front of an array.
  ........
    r83878 | florent.xicluna | 2010-08-09 10:29:08 +0200 (lun., 09 août 2010) | 1 line

    Merge the 2to3 script from /sandbox/trunk/2to3/2to3, revision 72867 (latest).
  ........
................
1 parent ca2a48f
Raw File
dynload_os2.c

/* Support for dynamic loading of extension modules */

#define  INCL_DOSERRORS
#define  INCL_DOSMODULEMGR
#include <os2.h>

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


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

dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
                                    const char *pathname, FILE *fp)
{
    dl_funcptr p;
    APIRET  rc;
    HMODULE hDLL;
    char failreason[256];
    char funcname[258];

    rc = DosLoadModule(failreason,
                       sizeof(failreason),
                       pathname,
                       &hDLL);

    if (rc != NO_ERROR) {
        char errBuf[256];
        PyOS_snprintf(errBuf, sizeof(errBuf),
                      "DLL load failed, rc = %d: %.200s",
                      rc, failreason);
        PyErr_SetString(PyExc_ImportError, errBuf);
        return NULL;
    }

    PyOS_snprintf(funcname, sizeof(funcname), "init%.200s", shortname);
    rc = DosQueryProcAddr(hDLL, 0L, funcname, &p);
    if (rc != NO_ERROR)
        p = NULL; /* Signify Failure to Acquire Entrypoint */
    return p;
}
back to top