rm TotallyNotJson

TotallyNotJson.roc now lives on the farm in virtual-dom-wip as Json.roc.
Any reference in stdlib or builtins has been removed, as well as the
last places it was used (in python/ruby-interop examples).
This commit is contained in:
shua 2024-06-28 15:23:48 +02:00
parent 67f555feea
commit d90da3af52
No known key found for this signature in database
GPG key ID: 73387DA37055770F
37 changed files with 114 additions and 144 deletions

View file

@ -227,15 +227,7 @@ PyObject * call_roc(PyObject *self, PyObject *args)
roc__mainForHost_1_exposed_generic(&ret, &arg);
// Create a Python string from the heap-allocated JSON bytes the Roc function returned.
PyObject* json_bytes = PyUnicode_FromStringAndSize((char*)ret.bytes, ret.len);
PyObject* json_module = PyImport_ImportModule("json");
PyObject* loads_func = PyObject_GetAttrString(json_module, "loads");
PyObject *loads_args = PyTuple_Pack(1, json_bytes);
PyObject* py_obj = PyObject_CallObject(loads_func, loads_args);
Py_XDECREF(loads_args);
Py_XDECREF(loads_func);
Py_XDECREF(json_module);
Py_XDECREF(json_bytes);
PyObject* py_obj = PyUnicode_FromStringAndSize((char*)ret.bytes, ret.len);
// Now that we've created py_str, we're no longer referencing the RocBytes.
decref((void *)&ret, alignof(uint8_t *));