mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49:08 +00:00
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:
parent
67f555feea
commit
d90da3af52
37 changed files with 114 additions and 144 deletions
|
@ -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 *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue