Adding C version of is.scalarlist