From 137ad27bed36437159ff9a29574a7ed840d4d96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sun, 28 Jun 2020 17:04:01 +0800 Subject: Product init function --- icclient/product.h | 1 + product.c | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/icclient/product.h b/icclient/product.h index ba999b3..0affebc 100644 --- a/icclient/product.h +++ b/icclient/product.h @@ -23,6 +23,7 @@ struct icclient_product { extern "C" { #endif + void icclient_product_init(struct icclient_product *product); void icclient_product_free(struct icclient_product *product); #ifdef __cplusplus diff --git a/product.c b/product.c index c38ce3f..39a4e59 100644 --- a/product.c +++ b/product.c @@ -1,6 +1,20 @@ #include #include "icclient/product.h" +void icclient_product_init(struct icclient_product *product) +{ + product->sku = NULL; + product->description = NULL; + product->comment = NULL; + product->thumb = NULL; + product->image = NULL; + product->price = .0; + product->prodgroup = NULL; + product->weight = .0; + product->author = NULL; + product->crosssell = NULL; +} + void icclient_product_free(struct icclient_product *product) { if (product->crosssell) -- cgit v1.2.3