Skip to content

Commit

Permalink
Improve comments; Fix static method
Browse files Browse the repository at this point in the history
  • Loading branch information
haohanyang committed Nov 26, 2024
1 parent 8c56fb3 commit 9ad87ba
Show file tree
Hide file tree
Showing 4 changed files with 165 additions and 140 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHREEQC

Python bindings of [PHREEQC Version 3](https://www.usgs.gov/software/phreeqc-version-3)
Python bindings of [IPHREEQC](https://www.usgs.gov/software/phreeqc-version-3)

## Install
```
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ build-backend = "scikit_build_core.build"

[project]
name = "phreeqc"
version = "0.2.0"
description="Python bindings for PHREEQC Version 3"
version = "0.2.1"
description="Python bindings for IPHREEQC"
readme = "README.md"
authors = [
{name = "Haohan Yang"}
Expand Down
7 changes: 4 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ namespace py = pybind11;
class _Phreeqc : public IPhreeqc
{
public:
void _AccumulateLine(const char *line)
bool _AccumulateLine(const char *line)
{
auto result = AccumulateLine(line);
if (result == VR_OUTOFMEMORY)
{
throw std::bad_alloc();
return false;
}
return true;
}

bool _SetCurrentSelectedOutputUserNumber(int n)
Expand Down Expand Up @@ -133,7 +134,7 @@ PYBIND11_MODULE(_iphreeqc, m)
.def("get_selected_output_string_line_count", &_Phreeqc::GetSelectedOutputStringLineCount)
.def("get_selected_output_string_on", &_Phreeqc::GetSelectedOutputStringOn)
.def("_get_selected_output_value", &_Phreeqc::_GetSelectedOutputValue)
.def("get_version_string", &_Phreeqc::GetVersionString)
.def_static("get_version_string", &_Phreeqc::GetVersionString)
.def("get_warning_string", &_Phreeqc::GetWarningString)
.def("get_warning_string_line", &_Phreeqc::GetWarningStringLine)
.def("get_warning_string_line_count", &_Phreeqc::GetWarningStringLineCount)
Expand Down
Loading

0 comments on commit 9ad87ba

Please sign in to comment.