typemap 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Net::ZooKeeper - Perl extension for Apache ZooKeeper
  2. #
  3. # Licensed to the Apache Software Foundation (ASF) under one
  4. # or more contributor license agreements. See the NOTICE file
  5. # distributed with this work for additional information
  6. # regarding copyright ownership. The ASF licenses this file
  7. # to you under the Apache License, Version 2.0 (the
  8. # "License"); you may not use this file except in compliance
  9. # with the License. You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. TYPEMAP
  19. Net::ZooKeeper T_ZK_HANDLE
  20. Net::ZooKeeper::Stat T_ZK_HANDLE
  21. Net::ZooKeeper::Watch T_ZK_HANDLE
  22. INPUT
  23. T_ZK_HANDLE
  24. if (SvROK($arg) && SvTYPE(SvRV($arg)) == SVt_PVHV &&
  25. sv_derived_from($arg, \"${ntype}\")) {
  26. $var = (HV*) SvRV($arg);
  27. }
  28. else {
  29. Perl_croak(aTHX_
  30. \"$var is not a hash reference of type ${ntype}\");
  31. }
  32. OUTPUT
  33. T_ZK_HANDLE
  34. NOT_IMPLEMENTED