summaryrefslogtreecommitdiffstats
path: root/src/tester.c
diff options
context:
space:
mode:
authorDetlev Casanova <detlev.casanova@gmail.com>2010-07-16 22:23:57 +0200
committerDetlev Casanova <detlev.casanova@gmail.com>2010-07-16 22:23:57 +0200
commit70bb12ccf8a86e3531826ae7bc2211061da8880a (patch)
tree5f3a56187306b22b5d78a4ac9e0123e894456ec0 /src/tester.c
parent1a7e7b2b1550e79052cf52cb6c8154ee53420730 (diff)
downloadlayman-70bb12ccf8a86e3531826ae7bc2211061da8880a.tar.gz
layman-70bb12ccf8a86e3531826ae7bc2211061da8880a.tar.bz2
layman-70bb12ccf8a86e3531826ae7bc2211061da8880a.zip
Use correct value when using PyObject_IsTrue
Add function laymanAPIGetAllInfo() Make use of _laymanAPIGetAllInfos() as a common base for both laymanAPIGetAllInfo() and laymanAPIGetAllInfos() Add function laymanAPIAddRepo and laymanAPIDeleteRepo
Diffstat (limited to 'src/tester.c')
-rw-r--r--src/tester.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/src/tester.c b/src/tester.c
index 3a80ec2..3268f66 100644
--- a/src/tester.c
+++ b/src/tester.c
@@ -35,19 +35,32 @@ int main(int argc, char *argv[])
printf("\n");
unsigned int len = stringListCount(strs);
- OverlayInfo *infos = calloc(len, sizeof(OverlayInfo));
- int count = laymanAPIGetAllInfos(l, strs, infos);
+ //OverlayInfo *infos = calloc(len, sizeof(OverlayInfo));
+ //int count = laymanAPIGetAllInfos(l, strs, infos);
- for (unsigned int i = 0; i < count; i++)
+ OverlayInfo *oi = laymanAPIGetAllInfo(l, "enlightenment");
+ if (oi)
{
- printf("%s\n~~~~~~~~~~~~~~~~~~~~\n", infos[i].name);
- printf("%s\n\n", infos[i].description);
- overlayInfoFree(infos[i]);
+ printf("%s\n~~~~~~~~~~~~~~~~~~~~\n", oi->name);
+ printf("%s\n\n", oi->description);
+ overlayInfoFree(*oi);
+ free(oi);
+ }
+
+ for (unsigned int i = 0; i < len; i++)
+ {
+ OverlayInfo *oi = laymanAPIGetAllInfo(l, stringListGetAt(strs, i));
+ if (!oi)
+ continue;
+ printf("%s\n~~~~~~~~~~~~~~~~~~~~\n", oi->name);
+ printf("%s\n\n", oi->description);
+ overlayInfoFree(*oi);
+ free(oi);
}
printf("\n");
- free(infos);
+ //free(infos);
bareConfigFree(cfg);
laymanAPIFree(l);