Skip to content

Commit 2688ddc

Browse files
committed
fix callback-setting return value types - fix #3
1 parent b2e270f commit 2688ddc

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

Changes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
- fix tests to use latest OpenGL::Modern (glGetUniformLocation_c removed _c)
2+
- fix callback-setting return value types (#3) - thanks @xuhaida76 for report
23

34
0.0402 2025-04-11
45
- minimum Perl 5.10 for better Exporter

GLFW.xs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ glfwSetWindowPosCallback(window, cbfun);
759759
GLFWwindow* window
760760
SV * cbfun
761761
CODE:
762-
void (*fpstatus)();
762+
GLFWwindowposfun fpstatus;
763763
void * upoint;
764764
int cvind = windowposfun;
765765
int i;
@@ -787,7 +787,7 @@ glfwSetWindowSizeCallback(window, cbfun);
787787
GLFWwindow* window
788788
SV * cbfun
789789
CODE:
790-
void (*fpstatus)();
790+
GLFWwindowsizefun fpstatus;
791791
void * upoint;
792792
int cvind = windowsizefun;
793793
int i;
@@ -814,7 +814,7 @@ glfwSetWindowCloseCallback(window, cbfun);
814814
GLFWwindow* window
815815
SV * cbfun
816816
CODE:
817-
void (*fpstatus)();
817+
GLFWwindowclosefun fpstatus;
818818
void * upoint;
819819
int cvind = windowclosefun;
820820
int i;
@@ -841,7 +841,7 @@ glfwSetWindowRefreshCallback(window, cbfun);
841841
GLFWwindow* window
842842
SV * cbfun
843843
CODE:
844-
void (*fpstatus)();
844+
GLFWwindowrefreshfun fpstatus;
845845
void * upoint;
846846
int cvind = windowrefreshfun;
847847
int i;
@@ -868,7 +868,7 @@ glfwSetWindowFocusCallback(window, cbfun);
868868
GLFWwindow* window
869869
SV * cbfun
870870
CODE:
871-
void (*fpstatus)();
871+
GLFWwindowfocusfun fpstatus;
872872
void * upoint;
873873
int cvind = windowfocusfun;
874874
int i;
@@ -895,7 +895,7 @@ glfwSetWindowIconifyCallback(window, cbfun);
895895
GLFWwindow* window
896896
SV * cbfun
897897
CODE:
898-
void (*fpstatus)();
898+
GLFWwindowiconifyfun fpstatus;
899899
void * upoint;
900900
int cvind = windowiconifyfun;
901901
int i;
@@ -922,7 +922,7 @@ glfwSetFramebufferSizeCallback(window, cbfun);
922922
GLFWwindow* window
923923
SV * cbfun
924924
CODE:
925-
void (*fpstatus)();
925+
GLFWframebuffersizefun fpstatus;
926926
void * upoint;
927927
int cvind = framebuffersizefun;
928928
int i;
@@ -949,7 +949,7 @@ glfwSetKeyCallback(window, cbfun);
949949
GLFWwindow* window
950950
SV * cbfun
951951
CODE:
952-
void (*fpstatus)();
952+
GLFWkeyfun fpstatus;
953953
void * upoint;
954954
int cvind = keyfun;
955955
int i;
@@ -977,7 +977,7 @@ glfwSetCharCallback(window, cbfun);
977977
GLFWwindow* window
978978
SV * cbfun
979979
CODE:
980-
void (*fpstatus)();
980+
GLFWcharfun fpstatus;
981981
void * upoint;
982982
int cvind = charfun;
983983
int i;
@@ -1004,7 +1004,7 @@ glfwSetCharModsCallback(window, cbfun);
10041004
GLFWwindow* window
10051005
SV * cbfun
10061006
CODE:
1007-
void (*fpstatus)();
1007+
GLFWcharmodsfun fpstatus;
10081008
void * upoint;
10091009
int cvind = charmodsfun;
10101010
int i;
@@ -1031,7 +1031,7 @@ glfwSetMouseButtonCallback(window, cbfun);
10311031
GLFWwindow* window
10321032
SV * cbfun
10331033
CODE:
1034-
void (*fpstatus)();
1034+
GLFWmousebuttonfun fpstatus;
10351035
void * upoint;
10361036
int cvind = mousebuttonfun;
10371037
int i;
@@ -1058,7 +1058,7 @@ glfwSetCursorPosCallback(window, cbfun);
10581058
GLFWwindow* window
10591059
SV * cbfun
10601060
CODE:
1061-
void (*fpstatus)();
1061+
GLFWcursorposfun fpstatus;
10621062
void * upoint;
10631063
int cvind = cursorposfun;
10641064
int i;
@@ -1085,7 +1085,7 @@ glfwSetCursorEnterCallback(window, cbfun);
10851085
GLFWwindow* window
10861086
SV * cbfun
10871087
CODE:
1088-
void (*fpstatus)();
1088+
GLFWcursorenterfun fpstatus;
10891089
void * upoint;
10901090
int cvind = cursorenterfun;
10911091
int i;
@@ -1112,7 +1112,7 @@ glfwSetScrollCallback(window, cbfun);
11121112
GLFWwindow* window
11131113
SV * cbfun
11141114
CODE:
1115-
void (*fpstatus)();
1115+
GLFWscrollfun fpstatus;
11161116
void * upoint;
11171117
int cvind = scrollfun;
11181118
int i;
@@ -1139,7 +1139,7 @@ glfwSetDropCallback(window, cbfun);
11391139
GLFWwindow* window
11401140
SV * cbfun
11411141
CODE:
1142-
void (*fpstatus)();
1142+
GLFWdropfun fpstatus;
11431143
void * upoint;
11441144
int cvind = dropfun;
11451145
int i;
@@ -1170,7 +1170,7 @@ void
11701170
glfwSetErrorCallback(cbfun)
11711171
SV * cbfun
11721172
CODE:
1173-
void (*fpstatus)();
1173+
GLFWerrorfun fpstatus;
11741174
// Warn if used in non-void context
11751175
if (GIMME_V != G_VOID) callback_warn();
11761176
//
@@ -1190,7 +1190,7 @@ void
11901190
glfwSetMonitorCallback(cbfun)
11911191
SV * cbfun
11921192
CODE:
1193-
void (*fpstatus)();
1193+
GLFWmonitorfun fpstatus;
11941194
// Warn if used in non-void context
11951195
if (GIMME_V != G_VOID) callback_warn();
11961196
// Need to fix return of previous CV
@@ -1209,7 +1209,7 @@ void
12091209
glfwSetJoystickCallback(cbfun)
12101210
SV * cbfun
12111211
CODE:
1212-
void (*fpstatus)();
1212+
GLFWjoystickfun fpstatus;
12131213
// Warn if used in non-void context
12141214
if (GIMME_V != G_VOID) callback_warn();
12151215
// Need to fix return of previous CV

0 commit comments

Comments
 (0)