CoreFW  Check-in [d4d333ba7f]

Overview
Comment:Let the iter point to the first object.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: d4d333ba7f2a5600a2061e08cacce1bb16505930720939f822857495f7b432c4
User & Date: js on 2012-04-22 13:19:15
Other Links: manifest | tags
Context
2012-04-22
14:03
Add cfw_is. check-in: ffa5357d1b user: js tags: trunk
13:19
Let the iter point to the first object. check-in: d4d333ba7f user: js tags: trunk
13:19
Remove useless if. check-in: 626a89988f user: js tags: trunk
Changes

Modified src/map.c from [e42157fde0] to [e562e52fa7].

354
355
356
357
358
359
360
361
362
363
364


365
366
367
368
369
370
371

	return true;
}

void
cfw_map_iter(CFWMap *map, cfw_map_iter_t *iter)
{
	iter->key = NULL;
	iter->obj = NULL;
	iter->_map = map;
	iter->_pos = 0;


}

void
cfw_map_iter_next(cfw_map_iter_t *iter)
{
	CFWMap *map = iter->_map;








<
<


>
>







354
355
356
357
358
359
360


361
362
363
364
365
366
367
368
369
370
371

	return true;
}

void
cfw_map_iter(CFWMap *map, cfw_map_iter_t *iter)
{


	iter->_map = map;
	iter->_pos = 0;

	cfw_map_iter_next(iter);
}

void
cfw_map_iter_next(cfw_map_iter_t *iter)
{
	CFWMap *map = iter->_map;

Modified tests/tests.c from [fcdf694b2d] to [4dca54f056].

34
35
36
37
38
39
40
41
42
43
44
45
46
47
48

static void
print_map(CFWMap *map)
{
	cfw_map_iter_t iter;

	cfw_map_iter(map, &iter);
	cfw_map_iter_next(&iter);

	fputs("{\n", stdout);

	while (iter.key != NULL) {
		printf("\t%s = %s\n",
		    cfw_string_c(iter.key),
		    cfw_string_c(iter.obj));







<







34
35
36
37
38
39
40

41
42
43
44
45
46
47

static void
print_map(CFWMap *map)
{
	cfw_map_iter_t iter;

	cfw_map_iter(map, &iter);


	fputs("{\n", stdout);

	while (iter.key != NULL) {
		printf("\t%s = %s\n",
		    cfw_string_c(iter.key),
		    cfw_string_c(iter.obj));