MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / _cffi_start_and_call_python

Function _cffi_start_and_call_python

pager_lib/cffi/_embedding.h:504–525  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

502}
503
504static
505void _cffi_start_and_call_python(struct _cffi_externpy_s *externpy, char *args)
506{
507 _cffi_call_python_fnptr fnptr;
508 int current_err = errno;
509#ifdef _MSC_VER
510 int current_lasterr = GetLastError();
511#endif
512 fnptr = _cffi_start_python();
513 if (fnptr == NULL) {
514 fprintf(stderr, "function %s() called, but initialization code "
515 "failed. Returning 0.\n", externpy->name);
516 memset(args, 0, externpy->size_of_result);
517 }
518#ifdef _MSC_VER
519 SetLastError(current_lasterr);
520#endif
521 errno = current_err;
522
523 if (fnptr != NULL)
524 fnptr(externpy, args);
525}
526
527
528/* The cffi_start_python() function makes sure Python is initialized

Callers

nothing calls this directly

Calls 1

_cffi_start_pythonFunction · 0.85

Tested by

no test coverage detected