Ejemplo n.º 1
0
int main(){
	unsigned int s = (unsigned int)time(NULL);
	printf("Session = %ui\n", s);
	return 0;
	srand(s);
	// Test string
	char * string = "Hello World!";
	CBByteArray * ba = CBNewByteArrayWithDataCopy((uint8_t *)string, (uint32_t)strlen(string) + 1);
	if (strcmp(string, (char *)CBByteArrayGetData(ba))) {
		printf("STRING COPY FAIL\n");
		return 1;
	}
	CBFreeByteArray(ba);
	return 0;
}
Ejemplo n.º 2
0
void CBFreeVersionChecksumBytes(void * vself) {
    CBVersionChecksumBytes * self = vself;
    if (self->cachedString) CBReleaseObject(self->cachedString);
    CBFreeByteArray(CBGetByteArray(self));
}