mirror of https://github.com/sipwise/sems.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
72 lines
1.5 KiB
72 lines
1.5 KiB
/*
|
|
* Interface wrapper code.
|
|
*
|
|
* Generated by SIP 4.1.1 (4.1.1-255) on Fri Feb 9 10:28:23 2007
|
|
*/
|
|
|
|
#include "sipAPIpy_sems.h"
|
|
#include "sippy_semsstring.h"
|
|
|
|
|
|
|
|
static int convertTo_string(PyObject *sipPy,void **sipCppPtrV,int *sipIsErr)
|
|
{
|
|
string **sipCppPtr = reinterpret_cast<string **>(sipCppPtrV);
|
|
|
|
#line 14 "string.sip"
|
|
// Allow a Python string whenever a string is expected.
|
|
if (sipIsErr == NULL)
|
|
return PyString_Check(sipPy);
|
|
if (sipPy == Py_None) {
|
|
*sipCppPtr = NULL;
|
|
return 0;
|
|
}
|
|
if (PyString_Check(sipPy)) {
|
|
*sipCppPtr = new std::string(PyString_AS_STRING(sipPy));
|
|
return 0;
|
|
}
|
|
*sipCppPtr = (std::string *)sipForceConvertTo_string(sipPy,sipIsErr);
|
|
return 1;
|
|
#line 31 "sippy_semsstring.cpp"
|
|
}
|
|
|
|
|
|
static void *forceConvertTo_string(PyObject *valobj,int *iserrp)
|
|
{
|
|
if (*iserrp || valobj == NULL)
|
|
return NULL;
|
|
|
|
if (convertTo_string(valobj,NULL,NULL))
|
|
{
|
|
void *val;
|
|
|
|
convertTo_string(valobj,&val,iserrp);
|
|
|
|
return val;
|
|
}
|
|
|
|
sipBadClass(sipNm_py_sems_string);
|
|
|
|
*iserrp = 1;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
|
|
static PyObject *convertFrom_string(void *sipCppV)
|
|
{
|
|
string *sipCpp = reinterpret_cast<string *>(sipCppV);
|
|
|
|
#line 9 "string.sip"
|
|
const char *s = sipCpp->c_str();
|
|
return PyString_FromString(s);
|
|
#line 64 "sippy_semsstring.cpp"
|
|
}
|
|
|
|
|
|
sipMappedTypeDef sipMappedType_string = {
|
|
forceConvertTo_string,
|
|
convertTo_string,
|
|
convertFrom_string
|
|
};
|