Skip to content

Fix "missing declaration for symbol ''pj_get_errno''" #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

rtsisyk
Copy link
Collaborator

@rtsisyk rtsisyk commented May 7, 2019

Closes #11

@Totktonada
Copy link
Member

As I see the reason of the problem is the typo in pj_get_errno_ref() function name and it can be fixed in this way:

diff --git a/gis/projection.lua b/gis/projection.lua
index c11729e..1bd184f 100644
--- a/gis/projection.lua
+++ b/gis/projection.lua
@@ -41,7 +41,7 @@ projections.PROJ_VERSION = PROJ_VERSION
 
 local function ctx_raise()
     -- local errno = lib.pj_ctx_get_errno(ctx)
-    local errno = lib.pj_get_errno(ctx)
+    local errno = lib.pj_get_errno_ref()[0]
     error('PROJ: '..ffi.string(lib.pj_strerrno(errno)))
 end
 

@rtsisyk Can you please explain why do you choose to use pj_ctx_alloc() and related functions? Is thread safety matters in case of tarantool?

@rtsisyk
Copy link
Collaborator Author

rtsisyk commented May 17, 2019

@rtsisyk Can you please explain why do you choose to use pj_ctx_alloc() and related functions? Is thread safety matters in case of tarantool?

Because other API was marked as deprecated.

@Totktonada
Copy link
Member

Because other API was marked as deprecated.

The whole proj_api.h is now deprecated. Anyway, both variants work, so I don't have objections.

@kostja kostja merged commit 3f95c31 into tarantool:master Aug 23, 2019
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.

missing declaration for symbol ''pj_get_errno'''
3 participants