| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # contributor license agreements. See the NOTICE file distributed with |
| # this work for additional information regarding copyright ownership. |
| # The ASF licenses this file to You under the Apache License, Version 2.0 |
| # (the "License"); you may not use this file except in compliance with |
| # the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| TYPEMAP |
| CFCBase* CLOWNFISH_TYPE |
| CFCCBlock* CLOWNFISH_TYPE |
| CFCClass* CLOWNFISH_TYPE |
| CFCDocuComment* CLOWNFISH_TYPE |
| CFCDumpable* CLOWNFISH_TYPE |
| CFCFile* CLOWNFISH_TYPE |
| CFCFunction* CLOWNFISH_TYPE |
| CFCHierarchy* CLOWNFISH_TYPE |
| CFCMethod* CLOWNFISH_TYPE |
| CFCMemPool* CLOWNFISH_TYPE |
| CFCParamList* CLOWNFISH_TYPE |
| CFCParcel* CLOWNFISH_TYPE |
| CFCParser* CLOWNFISH_TYPE |
| CFCSymbol* CLOWNFISH_TYPE |
| CFCType* CLOWNFISH_TYPE |
| CFCVariable* CLOWNFISH_TYPE |
| CFCBindCore* CLOWNFISH_BINDING_CORE |
| CFCBindClass* CLOWNFISH_BINDING_CORE_TYPE |
| |
| INPUT |
| |
| CLOWNFISH_TYPE |
| if (!SvOK($arg)) { |
| $var = NULL; |
| } |
| else if (sv_derived_from($arg, \"${(my $t = $type) =~ s/CFC(\w+).*/Clownfish::CFC::$1/;\$t}\")) { |
| IV objint = SvIV((SV*)SvRV($arg)); |
| $var = INT2PTR($type, objint); |
| } |
| else { |
| croak(\"Not a ${(my $t = $type) =~ s/CFC(\w+).*/Clownfish::CFC::$1/;\$t}\"); |
| } |
| |
| CLOWNFISH_BINDING_CORE |
| if (!SvOK($arg)) { |
| $var = NULL; |
| } |
| else if (sv_derived_from($arg, \"Clownfish::CFC::Binding::Core\")) { |
| IV objint = SvIV((SV*)SvRV($arg)); |
| $var = INT2PTR($type, objint); |
| } |
| else { |
| croak(\"Not a Clownfish::CFC::Binding::Core\"); |
| } |
| |
| CLOWNFISH_BINDING_CORE_TYPE |
| if (!SvOK($arg)) { |
| $var = NULL; |
| } |
| else if (sv_derived_from($arg, \"${(my $t = $type) =~ s/CFCBind(\w+).*/Clownfish::CFC::Binding::Core::$1/;\$t}\")) { |
| IV objint = SvIV((SV*)SvRV($arg)); |
| $var = INT2PTR($type, objint); |
| } |
| else { |
| croak(\"Not a ${(my $t = $type) =~ s/CFCBind(\w+).*/Clownfish::CFC::Binding::Core::$1/;\$t}\"); |
| } |
| |
| |
| OUTPUT |
| |
| CLOWNFISH_TYPE |
| sv_setref_pv($arg, \"${(my $t = $type) =~ s/CFC(\w+).*/Clownfish::CFC::$1/;\$t}\", (void*)$var); |
| |
| CLOWNFISH_BINDING_CORE |
| sv_setref_pv($arg, \"Clownfish::CFC::Binding::Core\", (void*)$var); |
| |
| CLOWNFISH_BINDING_CORE_TYPE |
| sv_setref_pv($arg, \"${(my $t = $type) =~ s/CFCBind(\w+).*/Clownfish::CFC::Binding::Core::$1/;\$t}\", (void*)$var); |
| |