• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ C_ASSERT函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中C_ASSERT函数的典型用法代码示例。如果您正苦于以下问题:C++ C_ASSERT函数的具体用法?C++ C_ASSERT怎么用?C++ C_ASSERT使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了C_ASSERT函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: hk_app

SAT_returnState hk_app(tc_tm_pkt *pkt) {

    if(!C_ASSERT(pkt != NULL && pkt->data != NULL) == true) { return SATR_ERROR; }
    if(!C_ASSERT(pkt->ser_subtype == TC_HK_REPORT_PARAMETERS ||
                 pkt->ser_subtype == TM_HK_PARAMETERS_REPORT) == true) {return SATR_ERROR; }

    if(pkt->ser_subtype == TC_HK_REPORT_PARAMETERS) {

        tc_tm_pkt *temp_pkt = 0;
        HK_struct_id sid = (HK_struct_id)pkt->data[0];

        hk_crt_empty_pkt_TM(&temp_pkt, (TC_TM_app_id)pkt->dest_id, sid);

        if(!C_ASSERT(temp_pkt != NULL) == true) {
            return SATR_ERROR;
        }

        route_pkt(temp_pkt);

    } else if(pkt->ser_subtype == TM_HK_PARAMETERS_REPORT) {

        const SAT_returnState res = hk_parameters_report(pkt->app_id, (HK_struct_id)pkt->data[0],  pkt->data, pkt->len);

        if(res == SATR_OK) {
            pkt->verification_state = SATR_OK;
        }
    }

    return SATR_OK;
}
开发者ID:nchronas,项目名称:ecss_services,代码行数:30,代码来源:housekeeping_service.c


示例2: GetImageInfoFromPEHeader

HRESULT GetImageInfoFromPEHeader( HANDLE hProcess, void* dllBase, uint16_t& machine, uint32_t& size, Address& prefBase )
{
    IMAGE_DOS_HEADER    dosHeader = { 0 };
    SIZE_T              cActual = 0;

    if ( !::ReadProcessMemory( hProcess, dllBase, &dosHeader, sizeof dosHeader, &cActual ) ) 
    {
        _ASSERT( !"Failed to read IMAGE_DOS_HEADER from loaded module" );
        return GetLastHr();
    }

    IMAGE_NT_HEADERS    ntHeaders = { 0 };
    void*               ntHeadersAddr = (void*) ((DWORD_PTR) dosHeader.e_lfanew + (DWORD_PTR) dllBase);
    
    if ( !::ReadProcessMemory( hProcess, ntHeadersAddr, &ntHeaders, sizeof ntHeaders, &cActual ) ) 
    {
        _ASSERT( !"Failed to read IMAGE_NT_HEADERS from loaded module" );
        return GetLastHr();
    }

    // These fields line up for 32 and 64-bit IMAGE_NT_HEADERS; make sure of it
    // otherwise, we would have had to check fileHeader.Characteristics & IMAGE_FILE_32BIT_MACHINE
    C_ASSERT( &((IMAGE_NT_HEADERS32*) 0)->OptionalHeader.SizeOfImage == 
              &((IMAGE_NT_HEADERS64*) 0)->OptionalHeader.SizeOfImage );
    C_ASSERT( &((IMAGE_NT_HEADERS32*) 0)->FileHeader.Machine == 
              &((IMAGE_NT_HEADERS64*) 0)->FileHeader.Machine );

    machine = ntHeaders.FileHeader.Machine;
    size = ntHeaders.OptionalHeader.SizeOfImage;
    prefBase = ntHeaders.OptionalHeader.ImageBase;

    return S_OK;
}
开发者ID:Kentorix,项目名称:MagoWrapper,代码行数:33,代码来源:Utility.cpp


示例3: seqiter_new

PmReturn_t
seqiter_new(pPmObj_t pobj, pPmObj_t *r_pobj)
{
    PmReturn_t retval;
    uint8_t *pchunk;
    pPmSeqIter_t psi;

    C_ASSERT(pobj != C_NULL);
    C_ASSERT(*r_pobj != C_NULL);

    /* Raise a TypeError if pobj is not a sequence */
    if ((OBJ_GET_TYPE(pobj) != OBJ_TYPE_STR)
            && (OBJ_GET_TYPE(pobj) != OBJ_TYPE_TUP)
            && (OBJ_GET_TYPE(pobj) != OBJ_TYPE_LST))
    {
        PM_RAISE(retval, PM_RET_EX_TYPE);
        return retval;
    }

    /* Alloc a chunk for the sequence iterator obj */
    retval = heap_getChunk(sizeof(PmSeqIter_t), &pchunk);
    PM_RETURN_IF_ERROR(retval);

    /* Set the sequence iterator's fields */
    psi = (pPmSeqIter_t)pchunk;
    OBJ_SET_TYPE(psi, OBJ_TYPE_SQI);
    psi->si_sequence = pobj;
    psi->si_index = 0;

    *r_pobj = (pPmObj_t)psi;
    return retval;
}
开发者ID:rumjack,项目名称:megapython,代码行数:32,代码来源:seq.c


示例4: seqiter_getNext

PmReturn_t
seqiter_getNext(pPmObj_t pobj, pPmObj_t *r_pitem)
{
    PmReturn_t retval;
    int16_t length;

    C_ASSERT(pobj != C_NULL);
    C_ASSERT(*r_pitem != C_NULL);
    C_ASSERT(OBJ_GET_TYPE(pobj) == OBJ_TYPE_SQI);

    /*
     * Raise TypeError if sequence iterator's object is not a sequence
     * otherwise, the get sequence's length
     */
    retval = seq_getLength(((pPmSeqIter_t)pobj)->si_sequence, &length);
    PM_RETURN_IF_ERROR(retval);

    /* Raise StopIteration if at the end of the sequence */
    if (((pPmSeqIter_t)pobj)->si_index == length)
    {
        /* Make null the pointer to the sequence */
        ((pPmSeqIter_t)pobj)->si_sequence = C_NULL;
        PM_RAISE(retval, PM_RET_EX_STOP);
        return retval;
    }

    /* Get the item at the current index */
    retval = seq_getSubscript(((pPmSeqIter_t)pobj)->si_sequence,
                              ((pPmSeqIter_t)pobj)->si_index, r_pitem);

    /* Increment the index */
    ((pPmSeqIter_t)pobj)->si_index++;

    return retval;
}
开发者ID:rumjack,项目名称:megapython,代码行数:35,代码来源:seq.c


示例5: DriverEntry

// driver entry
NTSTATUS DriverEntry(__in PDRIVER_OBJECT pDriverObject,__in PUNICODE_STRING pRegPath)
{
	PAGED_CODE();

	C_ASSERT(sizeof(CHidData) == 0x6c);
	C_ASSERT(sizeof(CDeviceExtension) == 0x200);

	NTSTATUS statusRet = STATUS_SUCCESS;

	AppleDebugPrint(DBGLEVEL_INFO,"Enter AppleKeyboard DriverEntry %p,%p\n",pDriverObject,pRegPath);

	pDriverObject->MajorFunction[IRP_MJ_CREATE] = AppleKeyboardCreate;
	pDriverObject->MajorFunction[IRP_MJ_CLOSE] = AppleKeyboardClose;
	pDriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = AppleKeyboardIoControl;
	pDriverObject->MajorFunction[IRP_MJ_INTERNAL_DEVICE_CONTROL] = AppleKeyboardInternalIoControl;
	pDriverObject->MajorFunction[IRP_MJ_PNP] = AppleKeyboardPnp;
	pDriverObject->MajorFunction[IRP_MJ_FLUSH_BUFFERS] = AppleKeyboardFlush;
	pDriverObject->MajorFunction[IRP_MJ_POWER] = AppleKeyboardPower;
	pDriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = AppleKeyboardSystemControl;
	pDriverObject->DriverUnload = AppleKeyboardUnload;
	pDriverObject->DriverExtension->AddDevice = AppleKeyboardAddDevice;

	g_regPath.Length = pRegPath->Length;
	g_regPath.MaximumLength = g_regPath.Length + sizeof(WCHAR);
	g_regPath.Buffer = static_cast<PWCH>(ExAllocatePoolWithTag(PagedPool,g_regPath.MaximumLength,'Appl'));
	if(g_regPath.Buffer)
		RtlCopyMemory(g_regPath.Buffer,pRegPath->Buffer,pRegPath->Length);
	else
		statusRet = STATUS_INSUFFICIENT_RESOURCES;

	AppleDebugPrint(DBGLEVEL_INFO,"Leave DriverEntry 0x%08x\n",statusRet);

	return statusRet;
}
开发者ID:killbug2004,项目名称:applebluetoothwirelesskeyboardhiddriverforwindows,代码行数:35,代码来源:DriverMain.cpp


示例6: float_print

PmReturn_t
float_print(pPmObj_t pf)
{
    uint8_t tBuffer[32];
    uint8_t bytesWritten;
    uint8_t i;
    PmReturn_t retval = PM_RET_OK;

    C_ASSERT(pf != C_NULL);

    /* Raise TypeError if obj is not an float */
    if (OBJ_GET_TYPE(pf) != OBJ_TYPE_FLT)
    {
        PM_RAISE(retval, PM_RET_EX_TYPE);
        return retval;
    }

    /* #196: Changed to use snprintf */
    bytesWritten = snprintf((char *)&tBuffer, 32, "%f", ((pPmFloat_t) pf)->val);

    /* Sanity check */
    C_ASSERT(bytesWritten != 0);
    C_ASSERT(bytesWritten < sizeof(tBuffer));

    for (i = (uint8_t)0; i < bytesWritten; i++)
    {
        retval = plat_putByte(tBuffer[i]);
        PM_RETURN_IF_ERROR(retval);
    }
    return PM_RET_OK;
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:31,代码来源:float.c


示例7: UpdateCacheEntryAtomically

// Helper method for updating an interface dispatch cache entry atomically. See comments by the usage of
// this method for the details of why we need this. If a racing update is detected false is returned and the
// update abandoned. This is necessary since it's not safe to update a valid cache entry (one with a non-NULL
// m_pInstanceType field) outside of a GC.
static bool UpdateCacheEntryAtomically(InterfaceDispatchCacheEntry *pEntry,
                                       EEType * pInstanceType,
                                       void * pTargetCode)
{
    C_ASSERT(sizeof(InterfaceDispatchCacheEntry) == (sizeof(void*) * 2));
    C_ASSERT(offsetof(InterfaceDispatchCacheEntry, m_pInstanceType) < offsetof(InterfaceDispatchCacheEntry, m_pTargetCode));

    return UpdatePointerPairAtomically(pEntry, pInstanceType, pTargetCode, true) == NULL;
}
开发者ID:danmosemsft,项目名称:corert,代码行数:13,代码来源:CachedInterfaceDispatch.cpp


示例8: C_ASSERT

static
int32_t
IDNA_FlagsToICU
(
	DWORD dwFlags
)
{
	C_ASSERT(IDN_ALLOW_UNASSIGNED == UIDNA_ALLOW_UNASSIGNED);
	C_ASSERT(IDN_USE_STD3_ASCII_RULES == UIDNA_USE_STD3_RULES);
	return dwFlags;
}
开发者ID:HBelusca,项目名称:NasuTek-Odyssey,代码行数:11,代码来源:idna.cpp


示例9: thread_new

PmReturn_t
thread_new(pPmObj_t pframe, pPmObj_t *r_pobj)
{
    PmReturn_t retval = PM_RET_OK;
    pPmThread_t pthread = C_NULL;

    C_ASSERT(pframe != C_NULL);

    /* If it's not a frame, raise TypeError */
    if (OBJ_GET_TYPE(pframe) != OBJ_TYPE_FRM)
    {
        PM_RAISE(retval, PM_RET_EX_TYPE);
        return retval;
    }

    /* Allocate a thread */
    retval = heap_getChunk(sizeof(PmThread_t), (uint8_t **)r_pobj);
    PM_RETURN_IF_ERROR(retval);

    /* Set type, frame and initialize status */
    pthread = (pPmThread_t)*r_pobj;
    OBJ_SET_TYPE(pthread, OBJ_TYPE_THR);
    pthread->pframe = (pPmFrame_t)pframe;
    pthread->interpctrl = INTERP_CTRL_CONT;

    return retval;
}
开发者ID:BackupGGCode,项目名称:megapython,代码行数:27,代码来源:thread.c


示例10: dict_clear

PmReturn_t
dict_clear(pPmObj_t pdict)
{
    PmReturn_t retval = PM_RET_OK;

    C_ASSERT(pdict != C_NULL);

    /* Raise TypeError if arg is not a dict */
    if (OBJ_GET_TYPE(pdict) != OBJ_TYPE_DIC)
    {
        PM_RAISE(retval, PM_RET_EX_TYPE);
        return retval;
    }

    /* clear length */
    ((pPmDict_t)pdict)->length = 0;

    /* Free the keys and values seglists if needed */
    if (((pPmDict_t)pdict)->d_keys != C_NULL)
    {
        PM_RETURN_IF_ERROR(seglist_clear(((pPmDict_t)pdict)->d_keys));
        PM_RETURN_IF_ERROR(heap_freeChunk((pPmObj_t)
                                          ((pPmDict_t)pdict)->d_keys));
        ((pPmDict_t)pdict)->d_keys = C_NULL;
    }
    if (((pPmDict_t)pdict)->d_vals != C_NULL)
    {
        PM_RETURN_IF_ERROR(seglist_clear(((pPmDict_t)pdict)->d_vals));
        retval = heap_freeChunk((pPmObj_t)((pPmDict_t)pdict)->d_vals);
        ((pPmDict_t)pdict)->d_vals = C_NULL;
    }
    return retval;
}
开发者ID:AGM1968,项目名称:python-on-a-chip,代码行数:33,代码来源:dict.c


示例11: rx_ecss

/**
 * This functions handles an incoming ECSS packet.
 * If the ECSS packet is part of a large data transfer consisting from
 * several sequential ECSS packets, it handles them automatically.
 *
 * In other words, there is no need to explicitly check for a fragmented data
 * transfer.
 *
 * @param payload the received payload
 * @param payload_size the size of the payload
 * @return SATR_OK if all went ok or appropriate error code
 */
SAT_returnState
rx_ecss (uint8_t *payload, const uint16_t payload_size)
{
  SAT_returnState ret;
  tc_tm_pkt *pkt;

  pkt = get_pkt (payload_size);

  if (!C_ASSERT(pkt != NULL)) {
    return SATR_ERROR;
  }
  if (unpack_pkt (payload, pkt, payload_size) == SATR_OK) {
    ret = route_pkt (pkt);
  }

  TC_TM_app_id dest = 0;

  if(pkt->type == TC) {
    dest = pkt->app_id;
  }
  else if(pkt->type == TM) {
    dest = pkt->dest_id;
  }

  if(dest == SYSTEM_APP_ID) {
      free_pkt(pkt);
  }

  return ret;
}
开发者ID:mashua,项目名称:ecss_services,代码行数:42,代码来源:comms.c


示例12: pm_vmPeriodic

/* Warning: Can be called in interrupt context! */
PmReturn_t
pm_vmPeriodic(uint16_t usecsSinceLastCall)
{
    /*
     * Add the full milliseconds to pm_timerMsTicks and store additional
     * microseconds for the next run. Thus, usecsSinceLastCall must be
     * less than 2^16-1000 so it will not overflow usecResidual.
     */
    static uint16_t usecResidual = 0;

    C_ASSERT(usecsSinceLastCall < 64536);

    usecResidual += usecsSinceLastCall;
    while (usecResidual >= 1000)
    {
        usecResidual -= 1000;
        pm_timerMsTicks++;
    }

    /* Check if enough time has passed for a scheduler run */
    if ((pm_timerMsTicks - pm_lastRescheduleTimestamp)
        >= PM_THREAD_TIMESLICE_MS)
    {
        interp_setRescheduleFlag((uint8_t)1);
        pm_lastRescheduleTimestamp = pm_timerMsTicks;
    }
    return PM_RET_OK;
}
开发者ID:01iv3r,项目名称:OpenPilot,代码行数:29,代码来源:pm.c


示例13: dict_delItem

PmReturn_t
dict_delItem(pPmObj_t pdict, pPmObj_t pkey)
{
    PmReturn_t retval = PM_RET_OK;
    int16_t indx = 0;

    C_ASSERT(pdict != C_NULL);

    /* Check for matching key */
    retval = seglist_findEqual(((pPmDict_t)pdict)->d_keys, pkey, &indx);

    /* Raise KeyError if key is not found */
    if (retval == PM_RET_NO)
    {
        PM_RAISE(retval, PM_RET_EX_KEY);
    }

    /* Return any other error */
    PM_RETURN_IF_ERROR(retval);

    /* Remove the key and value */
    retval = seglist_removeItem(((pPmDict_t)pdict)->d_keys, indx);
    PM_RETURN_IF_ERROR(retval);
    retval = seglist_removeItem(((pPmDict_t)pdict)->d_vals, indx);

    /* Reduce the item count */
    ((pPmDict_t)pdict)->length--;

    return retval;
}
开发者ID:AGM1968,项目名称:python-on-a-chip,代码行数:30,代码来源:dict.c


示例14: obj_repr

PmReturn_t
obj_repr(pPmObj_t pobj, pPmObj_t *r_pstr)
{
    uint8_t tBuffer[32];
    PmReturn_t retval = PM_RET_OK;
    uint8_t const *pcstr = (uint8_t *)tBuffer;;

    C_ASSERT(pobj != C_NULL);

    switch (OBJ_GET_TYPE(pobj))
    {
    case OBJ_TYPE_INT:
        retval = sli_ltoa10(((pPmInt_t)pobj)->val, tBuffer, sizeof(tBuffer));
        PM_RETURN_IF_ERROR(retval);
        retval = string_new(&pcstr, r_pstr);
        break;

#ifdef HAVE_FLOAT
    case OBJ_TYPE_FLT:
        /* #212: Use homebrew float formatter */
        retval = sli_ftoa(((pPmFloat_t)pobj)->val, tBuffer, sizeof(tBuffer));
        sli_strlen((char *)tBuffer);
        retval = string_new(&pcstr, r_pstr);
        break;
#endif /* HAVE_FLOAT */

    default:
        /* Otherwise raise a TypeError */
        PM_RAISE(retval, PM_RET_EX_TYPE);
        break;
    }

    return retval;
}
开发者ID:KnightSch,项目名称:python-on-a-chip,代码行数:34,代码来源:obj.c


示例15: heap_linkToFreelist

/* Inserts in order a chunk into the free list.  Caller adjusts heap state */
static PmReturn_t
heap_linkToFreelist(pPmHeapDesc_t pchunk)
{
    uint16_t size;
    pPmHeapDesc_t pscan;

    /* Ensure the object is already free */
    C_ASSERT(OBJ_GET_FREE(pchunk) != 0);

    /* If free list is empty, add to head of list */
    if (pmHeap.pfreelist == C_NULL)
    {
        pmHeap.pfreelist = pchunk;
        pchunk->next = C_NULL;
        pchunk->prev = C_NULL;

        return PM_RET_OK;
    }

    /* Scan free list for insertion point */
    pscan = pmHeap.pfreelist;
    size = OBJ_GET_SIZE(pchunk);
    while ((OBJ_GET_SIZE(pscan) < size) && (pscan->next != C_NULL))
    {
        pscan = pscan->next;
    }

    /*
     * Insert chunk after the scan chunk (next is NULL).
     * This is a slightly rare case where the last chunk in the free list
     * is smaller than the chunk being freed.
     */
    if (size > OBJ_GET_SIZE(pscan))
    {
        pchunk->next = pscan->next;
        pscan->next = pchunk;
        pchunk->prev = pscan;
    }

    /* Insert chunk before the scan chunk */
    else
    {
        pchunk->next = pscan;
        pchunk->prev = pscan->prev;

        /* If chunk will be first item in free list */
        if (pscan->prev == C_NULL)
        {
            pmHeap.pfreelist = pchunk;
        }
        else
        {
            pscan->prev->next = pchunk;
        }
        pscan->prev = pchunk;
    }

    return PM_RET_OK;
}
开发者ID:BackupGGCode,项目名称:megapython,代码行数:60,代码来源:heap.c


示例16: HLDLC_deframe

SAT_returnState HLDLC_deframe(uint8_t *buf_in,
                              uint8_t *buf_out,
                              const uint16_t size_in,
                              uint16_t *size_out) {

    if(!C_ASSERT(buf_in != 0 && buf_out != 0) == true)    { return SATR_ERROR; }

    uint16_t cnt = 0;

  //  for(uint16_t i = 1; i < size_in; i++) {
  //          if(buf_in[i] == HLDLC_START_FLAG) {
  //              cnt = 0;

   // }

    for(uint16_t i = 0; i < size_in; i++) {

        uint8_t c = buf_in[i];

        if(c == HLDLC_START_FLAG) {
            cnt = 0;
        } else if(c == HLDLC_STOP_FLAG) {
            *size_out = cnt;
            return SATR_EOT;
        } else if(c == HLDLC_CONTROL_FLAG) {
            i++;

            if(c == 0x5E) {
              buf_out[cnt++] = 0x7E;
            } else if(c == 0x5D) {
              buf_out[cnt++] = 0x7D;
            } else if(c== 0x5C) {
              buf_out[cnt++] = 0x7C;
            } else {
              return SATR_ERROR;
            }
        } else {
            buf_out[cnt++] = c;
        }

        if(!C_ASSERT(cnt < MAX_HLDLC_PKT_SIZE - 1) == true) {
          return SATR_ERROR;
        }
    }
    return SATR_ERROR;
}
开发者ID:nchronas,项目名称:ecss_services,代码行数:46,代码来源:hldlc.c


示例17: hk_crt_empty_pkt_TM

SAT_returnState hk_crt_empty_pkt_TM(tc_tm_pkt **pkt, const TC_TM_app_id app_id, const HK_struct_id sid) {

    *pkt = get_pkt(PKT_NORMAL);
    if(!C_ASSERT(*pkt != NULL) == true) { return SATR_ERROR; }

    hk_crt_pkt_TM(*pkt, app_id, sid);
    return SATR_OK;
}
开发者ID:nchronas,项目名称:ecss_services,代码行数:8,代码来源:housekeeping_service.c


示例18: while

static t_block	*cycle_fd(t_block **train, const int fd)
{
	t_block			*tmp;

	tmp = *train;
	while (tmp && tmp->fd != fd)
		tmp = tmp->next;
	if (!tmp)
	{
		C_ASSERT(tmp = (t_block *)ft_memalloc(sizeof(t_block)));
		tmp->fd = fd;
		C_ASSERT(tmp->str = ft_strnew(0));
		tmp->next = *train;
		*train = tmp;
	}
	return (tmp);
}
开发者ID:fakejoshmeier,项目名称:fdf,代码行数:17,代码来源:get_next_line.c


示例19: dict_update

PmReturn_t
dict_update(pPmObj_t pdestdict, pPmObj_t psourcedict, uint8_t omit_underscored)
{
    PmReturn_t retval = PM_RET_OK;
    int16_t i;
    pPmObj_t pkey;
    pPmObj_t pval;

    C_ASSERT(pdestdict != C_NULL);
    C_ASSERT(psourcedict != C_NULL);

    /* If it's not a dict, raise TypeError */
    if (OBJ_GET_TYPE(pdestdict) != OBJ_TYPE_DIC)
    {
        PM_RAISE(retval, PM_RET_EX_TYPE);
        return retval;
    }

    /* If it's not a dict, raise TypeError */
    if (OBJ_GET_TYPE(psourcedict) != OBJ_TYPE_DIC)
    {
        PM_RAISE(retval, PM_RET_EX_TYPE);
        return retval;
    }

    /* Iterate over the add-on dict */
    for (i = 0; i < ((pPmDict_t)psourcedict)->length; i++)
    {
        /* Get the key,val from the add-on dict */
        retval = seglist_getItem(((pPmDict_t)psourcedict)->d_keys, i, &pkey);
        PM_RETURN_IF_ERROR(retval);
        retval = seglist_getItem(((pPmDict_t)psourcedict)->d_vals, i, &pval);
        PM_RETURN_IF_ERROR(retval);

        if (!(omit_underscored && (OBJ_GET_TYPE(pkey) == OBJ_TYPE_STR)
              && ((pPmString_t)pkey)->val[0] == '_'))
        {
            /* Set the key,val to the destination dict */
            retval = dict_setItem(pdestdict, pkey, pval);
            PM_RETURN_IF_ERROR(retval);
        }
    }

    return retval;
}
开发者ID:AGM1968,项目名称:python-on-a-chip,代码行数:45,代码来源:dict.c


示例20: writeRegisterNoFence

 template < typename _T_REG_UNION > __forceinline void writeRegisterNoFence (
     _T_REG_UNION RegUnion
     ) const throw ()
 {
     C_ASSERT(sizeof(UINT32) == sizeof(ULONG));
     ULONG* const regPtr = reinterpret_cast<ULONG*>(
         ULONG_PTR(this->basePtr) + ULONG(RegUnion.OFFSET));
     ::WRITE_REGISTER_NOFENCE_ULONG(regPtr, RegUnion.AsUint32);
 } // writeRegisterNoFence<...> ( _T_REG_UNION )
开发者ID:parameshbabu,项目名称:bsp,代码行数:9,代码来源:rpisdhc.hpp



注:本文中的C_ASSERT函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ C_ENUM函数代码示例发布时间:2022-05-30
下一篇:
C++ C_ADDTO函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap