From 86ae68dd50b3e50e26d82247ac9a079665e7e5de Mon Sep 17 00:00:00 2001 From: King_DuckZ Date: Fri, 12 Feb 2021 13:56:27 +0100 Subject: [PATCH] Adding temporary notes and links --- links.txt | 8 ++++++++ src/pywrenppmodule.cpp | 3 +++ 2 files changed, 11 insertions(+) create mode 100644 links.txt diff --git a/links.txt b/links.txt new file mode 100644 index 0000000..d4c4484 --- /dev/null +++ b/links.txt @@ -0,0 +1,8 @@ +https://stackoverflow.com/questions/36093158/how-does-string-conversion-between-pyunicode-string-and-c-string-work +https://stackoverflow.com/questions/8001923/python-extension-module-with-variable-number-of-arguments +https://stackoverflow.com/questions/27451743/how-can-i-print-the-type-of-a-pyobject-in-an-error-message-for-an-embedded-pytho/27452057 + +https://docs.python.org/3.8/c-api/unicode.html#creating-and-accessing-unicode-strings +https://docs.python.org/3/extending/extending.html + +https://stackoverflow.com/questions/28263177/should-tp-alloc-tp-dealloc-and-tp-new-tp-free-be-considered-as-pairs diff --git a/src/pywrenppmodule.cpp b/src/pywrenppmodule.cpp index caa8706..29e9a8c 100644 --- a/src/pywrenppmodule.cpp +++ b/src/pywrenppmodule.cpp @@ -124,6 +124,9 @@ PyObject* vm_call (VMObject* self, PyObject* args) { self->vm.ensure_slots(static_cast(argc) + 1); variable(self->vm, wren::ModuleAndName{"main", "the_user"}, 0); + //TODO: missing error checks, see + //https://stackoverflow.com/questions/8001923/python-extension-module-with-variable-number-of-arguments + std::string func_sig; { Py_ssize_t sz;