Make some C symbols static
Fuji, Goro [Thu, 18 Nov 2010 02:20:05 +0000 (11:20 +0900)]
mouse.h
xs-src/Mouse.xs
xs-src/MouseTypeConstraints.xs

diff --git a/mouse.h b/mouse.h
index ff5edf8..7207eeb 100644 (file)
--- a/mouse.h
+++ b/mouse.h
@@ -191,8 +191,6 @@ CV* mouse_generate_can_predicate_for(pTHX_ SV* const klass, const char* const pr
 
 int mouse_is_an_instance_of(pTHX_ HV* const stash, SV* const instance);
 
-XS(XS_Mouse_constraint_check);
-
 /* Mouse XS Attribute object */
 
 AV* mouse_get_xa(pTHX_ SV* const attr);
index eff6ab7..831e522 100644 (file)
@@ -436,8 +436,8 @@ mouse_get_modifier_storage(pTHX_
     return (AV*)SvRV(storage_ref);
 }
 
-static void
-XS_Mouse_value_holder(pTHX_ CV* const cv PERL_UNUSED_DECL) {
+static
+XSPROTO(XS_Mouse_value_holder) {
     dVAR; dXSARGS;
     SV* const value = (SV*)XSANY.any_ptr;
     assert(value);
index f22a869..3f0a3d3 100644 (file)
@@ -12,6 +12,9 @@
 
 typedef int (*check_fptr_t)(pTHX_ SV* const data, SV* const sv);
 
+static
+XSPROTO(XS_Mouse_constraint_check);
+
 /*
     NOTE: mouse_tc_check() handles GETMAGIC
 */
@@ -544,8 +547,8 @@ mouse_generate_can_predicate_for(pTHX_ SV* const methods, const char* const pred
     return mouse_tc_generate(aTHX_ predicate_name, (check_fptr_t)mouse_can_methods, (SV*)param);
 }
 
-
-XS(XS_Mouse_constraint_check) {
+static
+XSPROTO(XS_Mouse_constraint_check) {
     dVAR;
     dXSARGS;
     MAGIC* const mg = (MAGIC*)XSANY.any_ptr;
@@ -561,8 +564,8 @@ XS(XS_Mouse_constraint_check) {
     XSRETURN(1);
 }
 
-XS(XS_Mouse_TypeConstraint_fallback); /* -Wmissing-prototypes */
-XS(XS_Mouse_TypeConstraint_fallback) {
+static
+XSPROTO(XS_Mouse_TypeConstraint_fallback) {
     dXSARGS;
     PERL_UNUSED_VAR(cv);
     PERL_UNUSED_VAR(items);