Questions tagged [c-api]
154 questions
0
votes
2 answers
mysql c api limit function
mysql_query(conn,"SELECT abstract FROM papers limit 4 ");
Can we use variables in limit function in C-api.Like I have to iteratively extract 10 rows,so something of the form:
mysql_query(conn,"SELECT abstract FROM papers limit $i $i+10 ");

akshita007
- 549
- 1
- 9
- 15
0
votes
2 answers
how to run a query in c without mysql_free_result(res)
while ((row = mysql_fetch_row(res)) != NULL) {
sprintf(statement, "DELETE FROM `outgoing` WHERE `outgoing`.`id`=%s", row[0]);
if (mysql_query(conn, statement)) {
fprintf(stderr, "%s\n", mysql_error(conn));
}
}
I am getting…
user2834392
0
votes
1 answer
Z3 c code works for some loop count numbers and not for others
I have written a Z3 program (starting from test_capi.c) that loops on some number "parameter" and adds constraints for each loop cycle, that are dependent on the previous loop's constraints. The idea is that each cycle 2 items a,d are selected which…

user3131978
- 37
- 1
- 1
- 7
0
votes
1 answer
Using C callback in C++/CLI
What I have
I'm using Vimba C API, in my C++/CLI application. It's known to work since my mate has it done and running without errors.
I've all the imports/include done. I'm using the API without errors, except one.
The Manual Says
In the manual of…

Btc Sources
- 1,912
- 2
- 30
- 58
0
votes
1 answer
using the C API requires #include
I'm trying to use the Tango C API, but in all the files in the SDK, there are references to #include . I have done some research and cannot find where to get the public tango API or what it is. Shouldn't the SDK include all…

David Menard
- 11
- 1
0
votes
2 answers
python 3 C-API extension ImportError
I am using Python3 on mac OS X 10.10.2. I am new to python C-API, so I am trying out a simple example of C-API extension from "Python Cookbook" http://chimera.labs.oreilly.com/books/1230000000393/ch15.html. I think there is some difference between…

Bongsoo Suh
- 11
- 1
0
votes
1 answer
How does Python allocate memory for objects of classes derived from C types?
Suppose we have created a Python module in C _xxx that contains an extension object xxx, and we do following:
import _xxx
class derived(_xxx.xxx):
# ...
d = derived()
How does Python allocate memory for d behind the scenes?
Eli Bendersky's…

P i
- 29,020
- 36
- 159
- 267
0
votes
1 answer
Python C-Api 32bit PyDict_Check Access Violation, Win7, Python 2.66
I am trying to use the Python C-Api for 32bit Project in VS2010.
I have installed the 64bit and 32bit Python. To distinguish the two
Versions, I have renamed the 32bit dll to 'python26_32.dll'. I have created an according import .lib file…

Andre
- 147
- 11
0
votes
2 answers
C API use to connect C & SQL database
I am trying to use C API to connect my C code to my SQL. I was wondering if anyone has any good beginner resources so I can get up to speed. All I am trying to do is just store data in tables I made in SQL. If it helps I am using MySQL on my Mac.…

Emmett Ogiony
- 83
- 8
0
votes
2 answers
Generate PHP opcode/bytecode from C
Say I want to write a small compiler in C which generates PHP bytecode from a custom language of choice (typoscript). How would I do that? Does PHP offer an API? Or would I need to hack parts of the default PHP compiler?
Edit: On a more general…

Olle Härstedt
- 3,799
- 1
- 24
- 57
0
votes
2 answers
how does cvpolylines work
following the delaunay triangulation given in learning opencv, I'm having some trouble understanding this snippet which is the final piece responsible for graphing the tesselation, here draw_subdiv_facet is being fed one voroni edge at a time
static…

tweaking
- 350
- 4
- 6
0
votes
1 answer
c++ cvShowImage error
I want to load an image with opencv. Everything is working properly but it doesn't show me the image. Code what I usin is here:
#include
#include
#include
using namespace cv;
using namespace std;
int main( int argc, const…

mikk
- 1
- 1
- 4
-1
votes
3 answers
C API: Return allocated array of user given size
I'm implementing a C API that exposes some data collected from a systemd service. The header of the API contains two structs:
typedef struct Info {
int latest;
int prev;
int cur;
} Info;
typedef struct InfoArray {
Info *info;
}…

Xershy
- 177
- 11
-1
votes
1 answer
How to get python return values in C?
I'm trying to pass an image from C to python and pass an array back from python to C and get length and data inside it.
Here is my Python code:
def detect(pI,col,row,channels):
I_reshape = np.asarray(list(pI), dtype=np.ubyte)
I_reshape =…

MJay
- 987
- 1
- 13
- 36
-1
votes
1 answer
error:capture is NULL in opencv in window7
I've seen other posts here similar to this question and even goggled and attempted to try every possible method stated, but neither of them worked for me.
following code is just to capture the image infinitely from webcam and Code is building…

shubham1994
- 1
- 2