Project

General

Profile

// generated from rosidl_generator_py/resource/_idl_pkg_typesupport_entry_point.c.em
// generated code does not contain a copyright notice
#include <Python.h>

static PyMethodDef turtle_interfaces__methods[] = {
{NULL, NULL, 0, NULL} /* sentinel */
};

static struct PyModuleDef turtle_interfaces__module = {
PyModuleDef_HEAD_INIT,
"_turtle_interfaces_support",
"_turtle_interfaces_doc",
-1, /* -1 means that the module keeps state in global variables */
turtle_interfaces__methods,
NULL,
NULL,
NULL,
NULL,
};

#include <stdbool.h>
#include <stdint.h>
#include "rosidl_runtime_c/visibility_control.h"
#include "rosidl_runtime_c/message_type_support_struct.h"
#include "rosidl_runtime_c/service_type_support_struct.h"
#include "rosidl_runtime_c/action_type_support_struct.h"
#include "turtle_interfaces/msg/detail/turtle_msg__type_support.h"
#include "turtle_interfaces/msg/detail/turtle_msg__struct.h"
#include "turtle_interfaces/msg/detail/turtle_msg__functions.h"

static void * turtle_interfaces__msg__turtle_msg__create_ros_message(void)
{
return turtle_interfaces__msg__TurtleMsg__create();
}

static void turtle_interfaces__msg__turtle_msg__destroy_ros_message(void * raw_ros_message)
{
turtle_interfaces__msg__TurtleMsg * ros_message = (turtle_interfaces__msg__TurtleMsg *)raw_ros_message;
turtle_interfaces__msg__TurtleMsg__destroy(ros_message);
}

ROSIDL_GENERATOR_C_IMPORT
bool turtle_interfaces__msg__turtle_msg__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * turtle_interfaces__msg__turtle_msg__convert_to_py(void * raw_ros_message);


ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, msg, TurtleMsg);

int8_t
_register_msg_type__msg__turtle_msg(PyObject * pymodule)
{
int8_t err;

PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__msg__turtle_msg__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__msg__turtle_msg",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__msg__turtle_msg__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__msg__turtle_msg",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&turtle_interfaces__msg__turtle_msg__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__msg__turtle_msg",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&turtle_interfaces__msg__turtle_msg__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__msg__turtle_msg",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, msg, TurtleMsg),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__msg__turtle_msg",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "turtle_interfaces/srv/detail/set_pose__type_support.h"
#include "turtle_interfaces/srv/detail/set_pose__struct.h"
#include "turtle_interfaces/srv/detail/set_pose__functions.h"

static void * turtle_interfaces__srv__set_pose__request__create_ros_message(void)
{
return turtle_interfaces__srv__SetPose_Request__create();
}

static void turtle_interfaces__srv__set_pose__request__destroy_ros_message(void * raw_ros_message)
{
turtle_interfaces__srv__SetPose_Request * ros_message = (turtle_interfaces__srv__SetPose_Request *)raw_ros_message;
turtle_interfaces__srv__SetPose_Request__destroy(ros_message);
}

ROSIDL_GENERATOR_C_IMPORT
bool turtle_interfaces__srv__set_pose__request__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * turtle_interfaces__srv__set_pose__request__convert_to_py(void * raw_ros_message);


ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetPose_Request);

int8_t
_register_msg_type__srv__set_pose__request(PyObject * pymodule)
{
int8_t err;

PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__request__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__set_pose__request",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__request__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__set_pose__request",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__request__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__set_pose__request",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__request__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__set_pose__request",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetPose_Request),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__set_pose__request",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "turtle_interfaces/srv/detail/set_pose__type_support.h"
// already included above
// #include "turtle_interfaces/srv/detail/set_pose__struct.h"
// already included above
// #include "turtle_interfaces/srv/detail/set_pose__functions.h"

static void * turtle_interfaces__srv__set_pose__response__create_ros_message(void)
{
return turtle_interfaces__srv__SetPose_Response__create();
}

static void turtle_interfaces__srv__set_pose__response__destroy_ros_message(void * raw_ros_message)
{
turtle_interfaces__srv__SetPose_Response * ros_message = (turtle_interfaces__srv__SetPose_Response *)raw_ros_message;
turtle_interfaces__srv__SetPose_Response__destroy(ros_message);
}

ROSIDL_GENERATOR_C_IMPORT
bool turtle_interfaces__srv__set_pose__response__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * turtle_interfaces__srv__set_pose__response__convert_to_py(void * raw_ros_message);


ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetPose_Response);

int8_t
_register_msg_type__srv__set_pose__response(PyObject * pymodule)
{
int8_t err;

PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__response__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__set_pose__response",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__response__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__set_pose__response",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__response__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__set_pose__response",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_pose__response__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__set_pose__response",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetPose_Response),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__set_pose__response",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

ROSIDL_GENERATOR_C_IMPORT
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, turtle_interfaces, srv, SetPose)();

int8_t
_register_srv_type__srv__set_pose(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, turtle_interfaces, srv, SetPose)(),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_srv__srv__set_pose",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
#include "turtle_interfaces/srv/detail/set_color__type_support.h"
#include "turtle_interfaces/srv/detail/set_color__struct.h"
#include "turtle_interfaces/srv/detail/set_color__functions.h"

static void * turtle_interfaces__srv__set_color__request__create_ros_message(void)
{
return turtle_interfaces__srv__SetColor_Request__create();
}

static void turtle_interfaces__srv__set_color__request__destroy_ros_message(void * raw_ros_message)
{
turtle_interfaces__srv__SetColor_Request * ros_message = (turtle_interfaces__srv__SetColor_Request *)raw_ros_message;
turtle_interfaces__srv__SetColor_Request__destroy(ros_message);
}

ROSIDL_GENERATOR_C_IMPORT
bool turtle_interfaces__srv__set_color__request__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * turtle_interfaces__srv__set_color__request__convert_to_py(void * raw_ros_message);


ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetColor_Request);

int8_t
_register_msg_type__srv__set_color__request(PyObject * pymodule)
{
int8_t err;

PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__request__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__set_color__request",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__request__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__set_color__request",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__request__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__set_color__request",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__request__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__set_color__request",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetColor_Request),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__set_color__request",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

// already included above
// #include <stdbool.h>
// already included above
// #include <stdint.h>
// already included above
// #include "rosidl_runtime_c/visibility_control.h"
// already included above
// #include "rosidl_runtime_c/message_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/service_type_support_struct.h"
// already included above
// #include "rosidl_runtime_c/action_type_support_struct.h"
// already included above
// #include "turtle_interfaces/srv/detail/set_color__type_support.h"
// already included above
// #include "turtle_interfaces/srv/detail/set_color__struct.h"
// already included above
// #include "turtle_interfaces/srv/detail/set_color__functions.h"

static void * turtle_interfaces__srv__set_color__response__create_ros_message(void)
{
return turtle_interfaces__srv__SetColor_Response__create();
}

static void turtle_interfaces__srv__set_color__response__destroy_ros_message(void * raw_ros_message)
{
turtle_interfaces__srv__SetColor_Response * ros_message = (turtle_interfaces__srv__SetColor_Response *)raw_ros_message;
turtle_interfaces__srv__SetColor_Response__destroy(ros_message);
}

ROSIDL_GENERATOR_C_IMPORT
bool turtle_interfaces__srv__set_color__response__convert_from_py(PyObject * _pymsg, void * ros_message);
ROSIDL_GENERATOR_C_IMPORT
PyObject * turtle_interfaces__srv__set_color__response__convert_to_py(void * raw_ros_message);


ROSIDL_GENERATOR_C_IMPORT
const rosidl_message_type_support_t *
ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetColor_Response);

int8_t
_register_msg_type__srv__set_color__response(PyObject * pymodule)
{
int8_t err;

PyObject * pyobject_create_ros_message = NULL;
pyobject_create_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__response__create_ros_message,
NULL, NULL);
if (!pyobject_create_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"create_ros_message_msg__srv__set_color__response",
pyobject_create_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_create_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_destroy_ros_message = NULL;
pyobject_destroy_ros_message = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__response__destroy_ros_message,
NULL, NULL);
if (!pyobject_destroy_ros_message) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"destroy_ros_message_msg__srv__set_color__response",
pyobject_destroy_ros_message);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_destroy_ros_message);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_from_py = NULL;
pyobject_convert_from_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__response__convert_from_py,
NULL, NULL);
if (!pyobject_convert_from_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_from_py_msg__srv__set_color__response",
pyobject_convert_from_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_from_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_convert_to_py = NULL;
pyobject_convert_to_py = PyCapsule_New(
(void *)&turtle_interfaces__srv__set_color__response__convert_to_py,
NULL, NULL);
if (!pyobject_convert_to_py) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"convert_to_py_msg__srv__set_color__response",
pyobject_convert_to_py);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_convert_to_py);
// previously added objects will be removed when the module is destroyed
return err;
}

PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_GET_MSG_TYPE_SUPPORT(turtle_interfaces, srv, SetColor_Response),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_msg__srv__set_color__response",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

ROSIDL_GENERATOR_C_IMPORT
const rosidl_service_type_support_t *
ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, turtle_interfaces, srv, SetColor)();

int8_t
_register_srv_type__srv__set_color(PyObject * pymodule)
{
int8_t err;
PyObject * pyobject_type_support = NULL;
pyobject_type_support = PyCapsule_New(
(void *)ROSIDL_TYPESUPPORT_INTERFACE__SERVICE_SYMBOL_NAME(rosidl_typesupport_c, turtle_interfaces, srv, SetColor)(),
NULL, NULL);
if (!pyobject_type_support) {
// previously added objects will be removed when the module is destroyed
return -1;
}
err = PyModule_AddObject(
pymodule,
"type_support_srv__srv__set_color",
pyobject_type_support);
if (err) {
// the created capsule needs to be decremented
Py_XDECREF(pyobject_type_support);
// previously added objects will be removed when the module is destroyed
return err;
}
return 0;
}

PyMODINIT_FUNC
PyInit_turtle_interfaces_s__rosidl_typesupport_c(void)
{
PyObject * pymodule = NULL;
pymodule = PyModule_Create(&turtle_interfaces__module);
if (!pymodule) {
return NULL;
}
int8_t err;

err = _register_msg_type__msg__turtle_msg(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

err = _register_msg_type__srv__set_pose__request(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

err = _register_msg_type__srv__set_pose__response(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

err = _register_srv_type__srv__set_pose(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

err = _register_msg_type__srv__set_color__request(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

err = _register_msg_type__srv__set_color__response(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

err = _register_srv_type__srv__set_color(pymodule);
if (err) {
Py_XDECREF(pymodule);
return NULL;
}

return pymodule;
}
(2-2/4)