Skip to content

Fix pybind11 type and signature handling issues#296

Open
tobwen wants to merge 1 commit intomapnik:masterfrom
tobwen:fix/pybind11-type-signature
Open

Fix pybind11 type and signature handling issues#296
tobwen wants to merge 1 commit intomapnik:masterfrom
tobwen:fix/pybind11-type-signature

Conversation

@tobwen
Copy link

@tobwen tobwen commented Feb 8, 2026

summary

These changes fix type mismatches and invalid identifier issues in the Python bindings that could cause import or runtime errors. Fixes #297

addressed issues

  • Convert PyLong_AsLongLong to PyLong_AsLong to match value_holder type
  • Replace invalid argument name with space (layer idx to layer_idx)
  • Add missing pybind11/stl.h include for std::vector return types

changes

  • src/mapnik_value_converter.hpp: Use correct integer conversion
  • src/mapnik_map.cpp: Fix py::arg identifier with invalid space character
  • src/mapnik_font_engine.cpp: Include STL bindings for vector type

These changes fix type mismatches and invalid identifier issues in the Python bindings that could cause import or runtime errors.
- Convert PyLong_AsLongLong to PyLong_AsLong to match value_holder type
- Replace invalid argument name with space (layer idx -> layer_idx)
- Add missing pybind11/stl.h include for std::vector return types

Changes:
- src/mapnik_value_converter.hpp: Use correct integer conversion
- src/mapnik_map.cpp: Fix py::arg identifier with invalid space character
- src/mapnik_font_engine.cpp: Include STL bindings for vector types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] ImportError: Internal error while parsing type signature (1) [HAS FIX]

1 participant