Skip to content

Commit

Permalink
Export NRNPy2String.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Nov 25, 2024
1 parent 262eeba commit b060441
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/nrnpython/nrnpy_utils.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#pragma once

#include "nrnwrap_Python.h"
#include "nrn_export.hpp"
#include <cassert>


inline bool is_python_string(PyObject* python_string) {
return PyUnicode_Check(python_string) || PyBytes_Check(python_string);
}

class Py2NRNString {
class NRN_EXPORT Py2NRNString {
public:
Py2NRNString(PyObject* python_string, bool disable_release = false);

Expand Down Expand Up @@ -42,7 +43,7 @@ class Py2NRNString {
* hoc_execerr_ext("hoc message : %s", e.c_str());
* e will be automatically deleted even though execerror does not return.
*/
class PyErr2NRNString {
class NRN_EXPORT PyErr2NRNString {
public:
PyErr2NRNString() {
str_ = NULL;
Expand Down

0 comments on commit b060441

Please sign in to comment.