Exemple #1
0
DDS_InstanceHandle_t *
DDS_InstanceHandleSeq_allocbuf (
    DDS_unsigned_long len
)
{
    return (DDS_InstanceHandle_t *)
           gapi_instanceHandleSeq_allocbuf (
               (gapi_unsigned_long) len
           );

}
static v_result
copy_matched_subscription(
    c_voidp info,
    c_voidp arg)
{
    struct v_subscriptionInfo *subscriptionInfo;
    gapi_instanceHandleSeq *to;
    gapi_instanceHandle_t *tmp_buffer;

    subscriptionInfo = (struct v_subscriptionInfo*)info;
    to = (gapi_instanceHandleSeq *)arg;

    if (to->_maximum <= to->_length) {
        tmp_buffer = to->_buffer;
        to->_buffer = gapi_instanceHandleSeq_allocbuf(to->_length + 10);
        to->_maximum = to->_length + 10;
        memcpy(to->_buffer, tmp_buffer, to->_length);
        gapi_free(tmp_buffer);
    }

    to->_buffer[to->_length] = u_instanceHandleFromGID(subscriptionInfo->key);
    ++to->_length;
    return V_RESULT_OK;
}
Exemple #3
0
void DDS::ccpp_AllocateGapiSeq( gapi_instanceHandle_t* *buffer, gapi_unsigned_long len)
{
  *buffer = gapi_instanceHandleSeq_allocbuf(len);
}