#747 Apply typemaps and checks to spf header

This commit is contained in:
Thomas Krijnen
2021-02-02 11:49:42 +01:00
parent 012a2cca0f
commit 55b63410bd
2 changed files with 28 additions and 1 deletions
+6
View File
@@ -25,7 +25,13 @@
}
$1 = python_sequence_as_vector<template_type>($input);
}
%typemap(typecheck,precedence=SWIG_TYPECHECK_INTEGER) std::vector<template_type> {
$1 = check_aggregate_of_type($input, get_python_type<template_type>()) ? 1 : 0;
}
%typemap(typecheck,precedence=SWIG_TYPECHECK_INTEGER) const std::vector<template_type>& {
$1 = check_aggregate_of_type($input, get_python_type<template_type>()) ? 1 : 0;
}
%typemap(arginit) const std::vector<template_type>& {
$1 = new std::vector<template_type>();
}